<template>
  <!-- 明细页面弹出框-->
  <el-dialog
    title="CIS代理行变更通知查询明细"
    center
    :visible.sync="open"
    width="1024px"
    :close-on-click-modal="true"
    @close="closeFn"
  >
    <el-form ref="detailsForm" :model="formData" label-width="126px" :disabled="true">
      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="交易流水号：" prop="id">
            <el-input v-model="formData.id" placeholder="" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="变更期数：" prop="chgNum">
            <el-input v-model="formData.chgNum" placeholder="" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="变更记录数目：" prop="chgRcrdnum">
            <el-input v-model="formData.chgRcrdnum" placeholder="" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="报文接收时间：" prop="rcvTime">
            <el-date-picker
              v-model="formData.rcvTime"
              type="datetime"
              value-format="yyyyMMddHHmmss"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <ht-table
      ref="dataTable"
      :showSerialNumber="false"
      :multi-select="false"
      :dictMap="dictMap"
      :initData="false"
      :reqConfig="reqConfig"
      :queryParams="queryParams"
      :tableBindColumns="tableBindColumns"
      defaultEventKey="detailsTable"
      style="height: 240px"
    ></ht-table>
    <div slot="footer" class="dialog-footer">
      <el-button @click="closeFn">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
import { detailsApiUrlConfig } from "@/api/cnaps/ccms/913/cis_agency_change_noti_query.js";

export default {
  name: "cisAgencyChangeDetails",
  components: {},
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
    formData: {
      type: Object,
      default: () => {
        return {};
      },
    },
    id: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      reqConfig: detailsApiUrlConfig,
      // 查询参数
      queryParams: {
        id: "",
      },
      tableBindColumns: [
        {
          label: `变更类型`,
          prop: "chgType",
          width: "140",
          align: "center",
          dictCode: "CHANGECODE",
        },
        {
          label: `生效类型`,
          prop: "effectType",
          width: "140",
          align: "center",
          dictCode: "EFFECTIVECODE",
        },
        {
          label: `生效日期`,
          prop: "effectDate",
          width: "140",
          align: "center",
          type: "date",
        },
        {
          label: `失效日期`,
          prop: "invalidDate",
          width: "150",
          align: "center",
          type: "date",
        },
        {
          label: `票交机构行号`,
          prop: "cisBrno",
          width: "200",
          align: "center",
        },
        {
          label: `小额代理行行号`,
          prop: "bepsProxybank",
          width: "200",
          align: "center",
        },
      ],
      // 是否显示弹出层
      open: false,
    };
  },
  mounted() {},
  watch: {
    open(d) {
      if (d) {
        this.$nextTick(() => {
          this.$set(this.queryParams, "id", this.id);
          this.$refs.dataTable.doQuery();
        });
      }
    },
  },
  methods: {
    // 表单重置
    reset() {
      this.resetForm("logForm");
    },
    closeFn() {
      this.open = false;
    },
    show() {
      this.open = true;
    },
    cancel() {
      this.open = false;
      this.reset();
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}

.form-card {
  margin-bottom: 10px;
}
</style>
